<?php

class Content extends Eloquent{
	protected $table = 'contents';
	protected $primaryKey = 'id';

	public function contentType(){
		return $this->belongsTo('ContentType', 'content_type_id');
	}

	public function idVsContent(){
		return $this->hasMany('IDVsContent','content_id');
	}

	public function post(){
		return $this->hasOne('Post', 'id');
	}

	public function reply(){
		return $this->hasOne('Reply', 'id');
	}

	public function album(){
		return $this->hasOne('Album', 'id');
	}

	public function media(){
		return $this->hasOne('Media', 'id');
	}

	public function replies(){
		return $this->hasMany('Reply', 'reply_to');
	}

	public function activityLogs(){
		return $this->hasMany('ActivityLog','content_id');
	}
}